<template>
        <div class="dialog" v-if="isShow"  >
            <div class="dialog-cover back"  @click="closeMyself"></div>
            <transition name="drop">
                <div class="dialog-content">
                    <div class="dialog_head back">
                         <!--弹窗头部 title-->
                          <slot name="header">提示</slot>
                    </div>
                    <div class="dialog_main">
                         <slot name="main">您发布竞价具有法律效益，请认真对待，确认发布竞价？</slot>
                    </div>
                    <div  class="foot_close" @click="closeMyself" v-if="!isConfirm">
                        <slot name="close">确定</slot>
                    </div>
                    <ul class="clearfix" v-if="isConfirm">
                        <li  @click="closeMyself">再想想</li>
                        <li  @click="confirmButton">确定</li>
                    </ul>
                </div>
            </transition>
        </div>
</template>

<script>

export default {
  props: {
    isShow: { 
    //弹窗组件是否显示 默认不显示
      type: Boolean,
      default: false,
      required:true, //必须
    },
    isConfirm:{
      type: Boolean,
      default: false
    }
    
  },

  data () {
    return {
      

    }
  },
  methods: {

    closeMyself() {
      this.$emit("on-close"); 
      //如果需要传参的话，可以在"on-close"后面再加参数，然后在父组件的函数里接收就可以了。
    },
    //点击确认
    confirmButton(){
      this.$emit("on-confirm");
    }
   
  },
  computed:{
      
  },
  created(){
   
  }
}
</script>

